Block[] projData = loadStrings("projects.txt"); //load the data from file
boolean rectAover = false;

void setup() {
  size(1000, 500);
  smooth();
  noStroke();
  println(projData);
  for (int i = 0; i < projData.length; i++) {
    float x = 10 + i*60;
    float y = 10 + i*50;
    float length = projData[i];
    println(projData[i]);
    // create new object
    projData[i] = new Block(x, y, length);
  }
}

void draw() {
  background(0);
  for (int i = 0; i < projData.length; i++) {
    projData[i].display(); //display each object
    //println(i);
  }
  //println("I thought about drawing");
}
